import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;

import javax.swing.ImageIcon;
import javax.swing.border.LineBorder;


public class TaxLot extends Lot
{
	// Dimensions:
	private int WIDTH;			// width of the property graphic
	private int HEIGHT;			// height of the property graphic
	
	private ImageIcon imageIncome; // image used for the IncomeTax logo on the lot
	private ImageIcon imageLuxury; // image used for the LuxuryTax logo on the lot
	
	public TaxLot(String name, String type, String location)
	{
		super(name, type, location);
		
		if(location == "south")
		{
			WIDTH = 55;
			HEIGHT = 100;
			//imageIncome = new ImageIcon("C:/Users/Jason/javacode/MONOPOLY/logos/IncomeTax_small.jpg");
			imageIncome = new ImageIcon("./logos/IncomeTax_small.jpg");
		}
		else if(location == "east")
		{
			WIDTH = 100;
			HEIGHT = 55;
			//imageLuxury = new ImageIcon("C:/Users/Jason/javacode/MONOPOLY/logos/LuxuryTax_small.jpg");
			imageLuxury = new ImageIcon("./logos/LuxuryTax_small.jpg");
		}
		
		setPreferredSize(new Dimension(WIDTH, HEIGHT));
		setBorder(new LineBorder(Color.black));
		setBackground(new Color(200,222,186));
	} // end TaxLot constructor
	
	// will actually draw the image:
	public void paintComponent(Graphics g)
	{	
		super.paintComponent(g);
		g.setColor(new Color(200,222,186));
		g.fillRect(0, 0, 55, 100);
		g.setColor(Color.black);
		
		if(location == "south")
		{
			g.drawLine(1, 1, 55, 1);
			imageIncome.paintIcon(this, g, 1, 2);
		}
		else if(location == "east")
		{
			g.drawLine(1, 1, 1, 55);
			imageLuxury.paintIcon(this, g ,2, 1);;
		}			
	} // end paintComponent
	
} // end class TaxLot
